﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zocono.WCS.Domain.EntityInfo;
using Zocono.WCS.Infrastructure.ApllicationDto.DtoWcsManage;

namespace Zocono.WCS.Domain.UserManageDomain
{
    public interface IUserInfoService : IDomainService
    {
        /// <summary>
        /// 用户登录
        /// </summary>
        /// <param name="userName"></param>
        /// <param name="password"></param>
        /// <returns></returns>
        Task<UserInfoApiDto> LoginAsync(string userName, string password);
        Task<UserInfoApiDto> GetUserByIDAsync(long userID);

        Task<bool> UpdateUserInfoAsync(long userID, string newPassword, string userName, string jobNumber, DateTime dateTime);
        /// <summary>
        /// 添加用户
        /// </summary>
        /// <param name="userInfoDto"></param>
        /// <returns></returns>
        Task<bool> AddUserAsync(UserInfoApiDto userInfoDto);

        Task<List<UserInfoApiDto>> GetUserListAsync();

        /// <summary>
        /// 管理员恢复他人密码
        /// </summary>
        /// <param name="userName"></param>
        /// <returns></returns>
        ///  优化参数  聚合根
        Task<bool> InitPasswordAsync(List<string> userNames);

        /// <summary>
        /// 用户修改密码
        /// </summary>
        /// <param name="newPassword"></param>
        /// <returns></returns>
        Task<bool> UpdatePasswordAsync(long userID, string newPassword);

        Task<bool> DeleteUserAsync(long userID);


        void Begin();

        void Commit();

        void RollBack();
    }
}
